package com.arcsoft.commonbase.utils

import android.os.Handler
import android.os.Message
import java.lang.ref.WeakReference

class WeakHandler(callback: Callback) : Handler() {
    private var mWeakReference = WeakReference<Callback>(callback)

    override fun handleMessage(msg: Message) {
        mWeakReference.get()?.handleMessage(msg)
    }

}